<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			* {
				padding: 0px;
				margin: 0px;
			}
			
			.web {
				height: 56px;
				width: 600px;
				margin: 0 auto;
			}
			
			ul {
				list-style-type: none;
				padding: 0px;
				float: right;
				position: relative;
				/*子元素absol*/
			}
			
			ul img {
				position: relative;
				top: 3px;
			}
			
			ul li {
				width: 110px;
				height: 50px;
				text-align: center;
				float: left;
			}
			
			ul li a {
				color: #848789;
				text-decoration: none;
				line-height: 50px;
			}
			
			ul a:hover {
				color: red;
			}
			
			.move {
				height: 2px;
				width: 100px;
				border-top: 2px solid red;
				/*只需要将上边显示出来*/
				position: absolute;
				left: 0;
				top: 52px;
				transition: left .2s ease-in-out 0s;
				/*包含四个过度属性：执行变换属性、执行时间、速率、延迟*/
				-webkit-transition: left .2s ease-in-out 0s;
				/*chrome和safari*/
				-moz-transition: left .2s ease-in-out 0s;
				/*firefox*/
				-o-transition: left .2s ease-in-out 0s;
				/*opera*/
			}
			/*li元素的父元素的第一个子元素，当鼠标停留其上时，move元素的left属性改变*/
			
			li:nth-child(1):hover~.move {
				left: 0px;
			}
			
			li:nth-child(2):hover~.move {
				left: 110px;
			}
			
			li:nth-child(3):hover~.move {
				left: 220px;
			}
			
			li:nth-child(4):hover~.move {
				left: 330px;
			}
			
			li:nth-child(5):hover~.move {
				left: 440px;
			}
			
			li:nth-child(6):hover~.move {
				left: 550px;
			}
		</style>
	</head>

	<body>
		<div class="web">
			<ul>
				<li>
					<a href="#">最新活动</a>
				</li>
				<li>
					<a href="#">最新活动</a>
				</li>
				<li>
					<a href="#">最新活动</a>
				</li>
				<li>
					<a href="#">最新活动</a>
				</li>
				<li>
					<a href="#">最新活动</a>
				</li>
				<li class="move"></li>
			</ul>
		</div>
	</body>

</html>